package com.zimmur.fastdfs;

import org.csource.fastdfs.ClientGlobal;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;

public class ClientGlobalInitializer implements InitializingBean{
	private Resource configResource;
	
	/**
	 * 设置客户端配置资源。
	 * 
	 * @param configResource 客户端配置资源。
	 */
	public void setConfigResource(Resource configResource) {
		this.configResource = configResource;
	}
	
	@Override
	public void afterPropertiesSet() throws Exception {
		ClientGlobal.init(configResource.getFile().getAbsolutePath());
		
	}

}
